Skip to content

ci: add GitHub Actions workflow for lint, typecheck, and tests#3836

Open
KuaaMU wants to merge 1 commit intodailydotdev:mainfrom
KuaaMU:ci/add-github-actions-workflow
Open

ci: add GitHub Actions workflow for lint, typecheck, and tests#3836
KuaaMU wants to merge 1 commit intodailydotdev:mainfrom
KuaaMU:ci/add-github-actions-workflow

Conversation

@KuaaMU
Copy link
Copy Markdown

@KuaaMU KuaaMU commented Apr 30, 2026

Summary

This PR adds a GitHub Actions CI workflow that runs on every pull request and push to main, ensuring code quality checks happen automatically.

Jobs

Job What it does
lint Runs pnpm run lint (ESLint with --max-warnings 0)
typecheck Runs pnpm run build (TypeScript compilation via tsc)
test Runs pnpm run test (Jest with PostgreSQL 16 + Redis 7 service containers)

Why this matters

The project has excellent local tooling — ESLint, Prettier, TypeScript strict mode, and 303+ tests — but none of these run automatically in CI. This means PRs can merge without passing lint, type checks, or tests.

Design decisions

  • PostgreSQL 16 service container with health checks — matches the api_test database used by tests
  • Redis 7 service container — required by test teardown/cleanup
  • Concurrency control — cancels in-progress runs when a new push arrives on the same PR
  • pnpm/action-setup@v4 — reads packageManager from package.json automatically (no hardcoded version)
  • Separate jobs — lint and typecheck run in parallel, test runs independently (can be made dependent if needed)

Environment variables

The workflow sets only the database/Redis connection variables needed for tests. Secrets and external service URLs are not required since tests mock external dependencies.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 30, 2026

CLA assistant check
All committers have signed the CLA.

Add a CI workflow that runs on pull requests and pushes to main:

- lint: ESLint with max 0 warnings
- typecheck: TypeScript compilation via tsc
- test: Jest test suite with PostgreSQL 16 and Redis 7 service containers

This ensures code quality checks run automatically on every PR,
preventing regressions from being merged without validation.
@KuaaMU KuaaMU force-pushed the ci/add-github-actions-workflow branch from 7fe2e53 to b11b2c3 Compare May 1, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants